wx.config({
	debug: false,
	appId: jsdk.appId,
	timestamp: jsdk.timestamp,
	nonceStr: jsdk.nonceStr,
	signature: jsdk.signature,
	jsApiList: [
  		'onMenuShareTimeline',
  		'onMenuShareAppMessage',
  		'previewImage'
	]
});

wx.ready(function(){
	wx.onMenuShareTimeline({
	    title: shareTitle, // 分享标题
	    link: shareUrl, // 分享链接
	    imgUrl: shareImg, // 分享图标
	    success: function () { 
	       // alert("分享成功");
	    },
	    cancel: function () { 
	      //  alert("你已经取消分享");
	    }
	});
	
	wx.onMenuShareAppMessage({
	    title: shareTitle, // 分享标题
	    desc: shareDesc, // 分享描述
	    link: shareUrl, // 分享链接
	    imgUrl: shareImg, // 分享图标
	    success: function () { 
	    	//alert("分享成功");
	    },
	    cancel: function () { 
	    	//alert("你已经取消分享");
	    }
	});
	
	$('.yf-pic-show').click(function(e){
		e.preventDefault();
		var pic = $(this).attr('data-pic');
		var allPic = $(this).parent().attr('data-pic');
		allPic = allPic.split(',');
		wx.previewImage({
		    current: pic, 
		    urls: allPic
		});
	});
});